/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		CHighScoreState.h
//
//		Author			:		Kevin Jordan
//
//		Purpose			:		Encapsulate all functionality in the HighScoreState class
//
//		Dates			:		Written( March 9, 2011 ) by Kevin Jordan		LastUpdate( March 9, 2011  ) by Jayson Wu
//	
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef CHIGHSCORESTATE_H_
#define CHIGHSCORESTATE_H_
#include "IBaseState.h"
#include <vector>
#include "string.h"
using namespace std;

struct ScoreStruct
{
public:
	int Score;
	string name;
};

class CHighScoreState : public IBaseState
{
private:
	string filepath;
	vector<ScoreStruct*> Records;
	float m_fBGM;
	int m_nBGI;
	bool Achieve;
	int LatestScore;

	int charPos;
	char buffer[100];
	char pressed;

	CHighScoreState();
	CHighScoreState( const CHighScoreState& copy);
	CHighScoreState& operator=( const CHighScoreState& assign);
	~CHighScoreState();
public:
	static CHighScoreState* GetInstance(void);
	void Enter();
	void Exit();
	void Render();
	void Update(float fElapsedTime);
	bool Input();
	//float GetSfx() { return m_fSFX; }
	float GetBgm() { return m_fBGM; }
//	bool Windowed() { return winToggle; }
	bool Load(const char* filename);
	bool Save(const char* filename);
	const char* GetPath()	{return filepath.c_str();}
	void Achievement( bool Trigger, int Score );
	int LowestScore() { if(Records[9])return Records[9]->Score; else return 0;}
};
#endif